<?php

	/**
	 * This class is simply a wrapper to access objects a little easier
	 * GET $this->[object]
	 * SET $this->[object] = [value]
	 * ISSET isset( $this->[object] ) -> returns TRUE if data[[object]] exists else false
	 * DUMP returns data[]
	 */

	class arrayobject
	{
		/**
		 * Data for this arrayobject
		 * -> array( )
		 */
		private $data = null;
		/**
		 * Quick reference to the core
		 */
		private $core = null;
		
		public function __construct(&$core, $data)
		{
			$this->core = &$core;
			$this->data = $data;
		}

		/**
		 * Dumps the data array
		 * __ is reserved for magic functions, ___ is used instead
		 */
		public function ___dump()
		{
			return $this->data;
		}

		/**
		 * Checks the existance of an element in the data array
		 */
		public function __isset($what)
		{
			if(isset($this->data[$what]))
			{
				return true;
			}
			
			return false;
		}

		/**
		 * Get data from array
		 */
		public function __get($what)
		{
			return $this->data[$what];
		}
		
		/**
		 * Add data to array
		 */
		public function __set($what, $value)
		{
			$this->data[$what] = $value;
		}
	}

?>